<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let obj = {username:'somi',age:26,data:{data:"123",success:false,message:'产生错误'}}
        // (1)普通解构
        let {username,age} =obj
        console.log(username,age);

        // (2)层层解构
        let {data:{success,message}} =obj
        console.log(success,message); 

        // (3)取别名
        let {data:{data:token}} = obj
        console.log(token);

    </script>
</body>
</html>